package com.pojo;

import java.util.ArrayList;
import java.util.List;

public class ProductExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public ProductExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andP_numIsNull() {
            addCriterion("p_num is null");
            return (Criteria) this;
        }

        public Criteria andP_numIsNotNull() {
            addCriterion("p_num is not null");
            return (Criteria) this;
        }

        public Criteria andP_numEqualTo(Integer value) {
            addCriterion("p_num =", value, "p_num");
            return (Criteria) this;
        }

        public Criteria andP_numNotEqualTo(Integer value) {
            addCriterion("p_num <>", value, "p_num");
            return (Criteria) this;
        }

        public Criteria andP_numGreaterThan(Integer value) {
            addCriterion("p_num >", value, "p_num");
            return (Criteria) this;
        }

        public Criteria andP_numGreaterThanOrEqualTo(Integer value) {
            addCriterion("p_num >=", value, "p_num");
            return (Criteria) this;
        }

        public Criteria andP_numLessThan(Integer value) {
            addCriterion("p_num <", value, "p_num");
            return (Criteria) this;
        }

        public Criteria andP_numLessThanOrEqualTo(Integer value) {
            addCriterion("p_num <=", value, "p_num");
            return (Criteria) this;
        }

        public Criteria andP_numIn(List<Integer> values) {
            addCriterion("p_num in", values, "p_num");
            return (Criteria) this;
        }

        public Criteria andP_numNotIn(List<Integer> values) {
            addCriterion("p_num not in", values, "p_num");
            return (Criteria) this;
        }

        public Criteria andP_numBetween(Integer value1, Integer value2) {
            addCriterion("p_num between", value1, value2, "p_num");
            return (Criteria) this;
        }

        public Criteria andP_numNotBetween(Integer value1, Integer value2) {
            addCriterion("p_num not between", value1, value2, "p_num");
            return (Criteria) this;
        }

        public Criteria andP_idIsNull() {
            addCriterion("p_id is null");
            return (Criteria) this;
        }

        public Criteria andP_idIsNotNull() {
            addCriterion("p_id is not null");
            return (Criteria) this;
        }

        public Criteria andP_idEqualTo(String value) {
            addCriterion("p_id =", value, "p_id");
            return (Criteria) this;
        }

        public Criteria andP_idNotEqualTo(String value) {
            addCriterion("p_id <>", value, "p_id");
            return (Criteria) this;
        }

        public Criteria andP_idGreaterThan(String value) {
            addCriterion("p_id >", value, "p_id");
            return (Criteria) this;
        }

        public Criteria andP_idGreaterThanOrEqualTo(String value) {
            addCriterion("p_id >=", value, "p_id");
            return (Criteria) this;
        }

        public Criteria andP_idLessThan(String value) {
            addCriterion("p_id <", value, "p_id");
            return (Criteria) this;
        }

        public Criteria andP_idLessThanOrEqualTo(String value) {
            addCriterion("p_id <=", value, "p_id");
            return (Criteria) this;
        }

        public Criteria andP_idLike(String value) {
            addCriterion("p_id like", value, "p_id");
            return (Criteria) this;
        }

        public Criteria andP_idNotLike(String value) {
            addCriterion("p_id not like", value, "p_id");
            return (Criteria) this;
        }

        public Criteria andP_idIn(List<String> values) {
            addCriterion("p_id in", values, "p_id");
            return (Criteria) this;
        }

        public Criteria andP_idNotIn(List<String> values) {
            addCriterion("p_id not in", values, "p_id");
            return (Criteria) this;
        }

        public Criteria andP_idBetween(String value1, String value2) {
            addCriterion("p_id between", value1, value2, "p_id");
            return (Criteria) this;
        }

        public Criteria andP_idNotBetween(String value1, String value2) {
            addCriterion("p_id not between", value1, value2, "p_id");
            return (Criteria) this;
        }

        public Criteria andP_nameIsNull() {
            addCriterion("p_name is null");
            return (Criteria) this;
        }

        public Criteria andP_nameIsNotNull() {
            addCriterion("p_name is not null");
            return (Criteria) this;
        }

        public Criteria andP_nameEqualTo(String value) {
            addCriterion("p_name =", value, "p_name");
            return (Criteria) this;
        }

        public Criteria andP_nameNotEqualTo(String value) {
            addCriterion("p_name <>", value, "p_name");
            return (Criteria) this;
        }

        public Criteria andP_nameGreaterThan(String value) {
            addCriterion("p_name >", value, "p_name");
            return (Criteria) this;
        }

        public Criteria andP_nameGreaterThanOrEqualTo(String value) {
            addCriterion("p_name >=", value, "p_name");
            return (Criteria) this;
        }

        public Criteria andP_nameLessThan(String value) {
            addCriterion("p_name <", value, "p_name");
            return (Criteria) this;
        }

        public Criteria andP_nameLessThanOrEqualTo(String value) {
            addCriterion("p_name <=", value, "p_name");
            return (Criteria) this;
        }

        public Criteria andP_nameLike(String value) {
            addCriterion("p_name like", value, "p_name");
            return (Criteria) this;
        }

        public Criteria andP_nameNotLike(String value) {
            addCriterion("p_name not like", value, "p_name");
            return (Criteria) this;
        }

        public Criteria andP_nameIn(List<String> values) {
            addCriterion("p_name in", values, "p_name");
            return (Criteria) this;
        }

        public Criteria andP_nameNotIn(List<String> values) {
            addCriterion("p_name not in", values, "p_name");
            return (Criteria) this;
        }

        public Criteria andP_nameBetween(String value1, String value2) {
            addCriterion("p_name between", value1, value2, "p_name");
            return (Criteria) this;
        }

        public Criteria andP_nameNotBetween(String value1, String value2) {
            addCriterion("p_name not between", value1, value2, "p_name");
            return (Criteria) this;
        }

        public Criteria andP_typeIsNull() {
            addCriterion("p_type is null");
            return (Criteria) this;
        }

        public Criteria andP_typeIsNotNull() {
            addCriterion("p_type is not null");
            return (Criteria) this;
        }

        public Criteria andP_typeEqualTo(String value) {
            addCriterion("p_type =", value, "p_type");
            return (Criteria) this;
        }

        public Criteria andP_typeNotEqualTo(String value) {
            addCriterion("p_type <>", value, "p_type");
            return (Criteria) this;
        }

        public Criteria andP_typeGreaterThan(String value) {
            addCriterion("p_type >", value, "p_type");
            return (Criteria) this;
        }

        public Criteria andP_typeGreaterThanOrEqualTo(String value) {
            addCriterion("p_type >=", value, "p_type");
            return (Criteria) this;
        }

        public Criteria andP_typeLessThan(String value) {
            addCriterion("p_type <", value, "p_type");
            return (Criteria) this;
        }

        public Criteria andP_typeLessThanOrEqualTo(String value) {
            addCriterion("p_type <=", value, "p_type");
            return (Criteria) this;
        }

        public Criteria andP_typeLike(String value) {
            addCriterion("p_type like", value, "p_type");
            return (Criteria) this;
        }

        public Criteria andP_typeNotLike(String value) {
            addCriterion("p_type not like", value, "p_type");
            return (Criteria) this;
        }

        public Criteria andP_typeIn(List<String> values) {
            addCriterion("p_type in", values, "p_type");
            return (Criteria) this;
        }

        public Criteria andP_typeNotIn(List<String> values) {
            addCriterion("p_type not in", values, "p_type");
            return (Criteria) this;
        }

        public Criteria andP_typeBetween(String value1, String value2) {
            addCriterion("p_type between", value1, value2, "p_type");
            return (Criteria) this;
        }

        public Criteria andP_typeNotBetween(String value1, String value2) {
            addCriterion("p_type not between", value1, value2, "p_type");
            return (Criteria) this;
        }

        public Criteria andP_brandIsNull() {
            addCriterion("p_brand is null");
            return (Criteria) this;
        }

        public Criteria andP_brandIsNotNull() {
            addCriterion("p_brand is not null");
            return (Criteria) this;
        }

        public Criteria andP_brandEqualTo(String value) {
            addCriterion("p_brand =", value, "p_brand");
            return (Criteria) this;
        }

        public Criteria andP_brandNotEqualTo(String value) {
            addCriterion("p_brand <>", value, "p_brand");
            return (Criteria) this;
        }

        public Criteria andP_brandGreaterThan(String value) {
            addCriterion("p_brand >", value, "p_brand");
            return (Criteria) this;
        }

        public Criteria andP_brandGreaterThanOrEqualTo(String value) {
            addCriterion("p_brand >=", value, "p_brand");
            return (Criteria) this;
        }

        public Criteria andP_brandLessThan(String value) {
            addCriterion("p_brand <", value, "p_brand");
            return (Criteria) this;
        }

        public Criteria andP_brandLessThanOrEqualTo(String value) {
            addCriterion("p_brand <=", value, "p_brand");
            return (Criteria) this;
        }

        public Criteria andP_brandLike(String value) {
            addCriterion("p_brand like", value, "p_brand");
            return (Criteria) this;
        }

        public Criteria andP_brandNotLike(String value) {
            addCriterion("p_brand not like", value, "p_brand");
            return (Criteria) this;
        }

        public Criteria andP_brandIn(List<String> values) {
            addCriterion("p_brand in", values, "p_brand");
            return (Criteria) this;
        }

        public Criteria andP_brandNotIn(List<String> values) {
            addCriterion("p_brand not in", values, "p_brand");
            return (Criteria) this;
        }

        public Criteria andP_brandBetween(String value1, String value2) {
            addCriterion("p_brand between", value1, value2, "p_brand");
            return (Criteria) this;
        }

        public Criteria andP_brandNotBetween(String value1, String value2) {
            addCriterion("p_brand not between", value1, value2, "p_brand");
            return (Criteria) this;
        }

        public Criteria andP_codeIsNull() {
            addCriterion("p_code is null");
            return (Criteria) this;
        }

        public Criteria andP_codeIsNotNull() {
            addCriterion("p_code is not null");
            return (Criteria) this;
        }

        public Criteria andP_codeEqualTo(String value) {
            addCriterion("p_code =", value, "p_code");
            return (Criteria) this;
        }

        public Criteria andP_codeNotEqualTo(String value) {
            addCriterion("p_code <>", value, "p_code");
            return (Criteria) this;
        }

        public Criteria andP_codeGreaterThan(String value) {
            addCriterion("p_code >", value, "p_code");
            return (Criteria) this;
        }

        public Criteria andP_codeGreaterThanOrEqualTo(String value) {
            addCriterion("p_code >=", value, "p_code");
            return (Criteria) this;
        }

        public Criteria andP_codeLessThan(String value) {
            addCriterion("p_code <", value, "p_code");
            return (Criteria) this;
        }

        public Criteria andP_codeLessThanOrEqualTo(String value) {
            addCriterion("p_code <=", value, "p_code");
            return (Criteria) this;
        }

        public Criteria andP_codeLike(String value) {
            addCriterion("p_code like", value, "p_code");
            return (Criteria) this;
        }

        public Criteria andP_codeNotLike(String value) {
            addCriterion("p_code not like", value, "p_code");
            return (Criteria) this;
        }

        public Criteria andP_codeIn(List<String> values) {
            addCriterion("p_code in", values, "p_code");
            return (Criteria) this;
        }

        public Criteria andP_codeNotIn(List<String> values) {
            addCriterion("p_code not in", values, "p_code");
            return (Criteria) this;
        }

        public Criteria andP_codeBetween(String value1, String value2) {
            addCriterion("p_code between", value1, value2, "p_code");
            return (Criteria) this;
        }

        public Criteria andP_codeNotBetween(String value1, String value2) {
            addCriterion("p_code not between", value1, value2, "p_code");
            return (Criteria) this;
        }

        public Criteria andP_ruleIsNull() {
            addCriterion("p_rule is null");
            return (Criteria) this;
        }

        public Criteria andP_ruleIsNotNull() {
            addCriterion("p_rule is not null");
            return (Criteria) this;
        }

        public Criteria andP_ruleEqualTo(String value) {
            addCriterion("p_rule =", value, "p_rule");
            return (Criteria) this;
        }

        public Criteria andP_ruleNotEqualTo(String value) {
            addCriterion("p_rule <>", value, "p_rule");
            return (Criteria) this;
        }

        public Criteria andP_ruleGreaterThan(String value) {
            addCriterion("p_rule >", value, "p_rule");
            return (Criteria) this;
        }

        public Criteria andP_ruleGreaterThanOrEqualTo(String value) {
            addCriterion("p_rule >=", value, "p_rule");
            return (Criteria) this;
        }

        public Criteria andP_ruleLessThan(String value) {
            addCriterion("p_rule <", value, "p_rule");
            return (Criteria) this;
        }

        public Criteria andP_ruleLessThanOrEqualTo(String value) {
            addCriterion("p_rule <=", value, "p_rule");
            return (Criteria) this;
        }

        public Criteria andP_ruleLike(String value) {
            addCriterion("p_rule like", value, "p_rule");
            return (Criteria) this;
        }

        public Criteria andP_ruleNotLike(String value) {
            addCriterion("p_rule not like", value, "p_rule");
            return (Criteria) this;
        }

        public Criteria andP_ruleIn(List<String> values) {
            addCriterion("p_rule in", values, "p_rule");
            return (Criteria) this;
        }

        public Criteria andP_ruleNotIn(List<String> values) {
            addCriterion("p_rule not in", values, "p_rule");
            return (Criteria) this;
        }

        public Criteria andP_ruleBetween(String value1, String value2) {
            addCriterion("p_rule between", value1, value2, "p_rule");
            return (Criteria) this;
        }

        public Criteria andP_ruleNotBetween(String value1, String value2) {
            addCriterion("p_rule not between", value1, value2, "p_rule");
            return (Criteria) this;
        }

        public Criteria andP_costIsNull() {
            addCriterion("p_cost is null");
            return (Criteria) this;
        }

        public Criteria andP_costIsNotNull() {
            addCriterion("p_cost is not null");
            return (Criteria) this;
        }

        public Criteria andP_costEqualTo(Integer value) {
            addCriterion("p_cost =", value, "p_cost");
            return (Criteria) this;
        }

        public Criteria andP_costNotEqualTo(Integer value) {
            addCriterion("p_cost <>", value, "p_cost");
            return (Criteria) this;
        }

        public Criteria andP_costGreaterThan(Integer value) {
            addCriterion("p_cost >", value, "p_cost");
            return (Criteria) this;
        }

        public Criteria andP_costGreaterThanOrEqualTo(Integer value) {
            addCriterion("p_cost >=", value, "p_cost");
            return (Criteria) this;
        }

        public Criteria andP_costLessThan(Integer value) {
            addCriterion("p_cost <", value, "p_cost");
            return (Criteria) this;
        }

        public Criteria andP_costLessThanOrEqualTo(Integer value) {
            addCriterion("p_cost <=", value, "p_cost");
            return (Criteria) this;
        }

        public Criteria andP_costIn(List<Integer> values) {
            addCriterion("p_cost in", values, "p_cost");
            return (Criteria) this;
        }

        public Criteria andP_costNotIn(List<Integer> values) {
            addCriterion("p_cost not in", values, "p_cost");
            return (Criteria) this;
        }

        public Criteria andP_costBetween(Integer value1, Integer value2) {
            addCriterion("p_cost between", value1, value2, "p_cost");
            return (Criteria) this;
        }

        public Criteria andP_costNotBetween(Integer value1, Integer value2) {
            addCriterion("p_cost not between", value1, value2, "p_cost");
            return (Criteria) this;
        }

        public Criteria andP_retailIsNull() {
            addCriterion("p_retail is null");
            return (Criteria) this;
        }

        public Criteria andP_retailIsNotNull() {
            addCriterion("p_retail is not null");
            return (Criteria) this;
        }

        public Criteria andP_retailEqualTo(Integer value) {
            addCriterion("p_retail =", value, "p_retail");
            return (Criteria) this;
        }

        public Criteria andP_retailNotEqualTo(Integer value) {
            addCriterion("p_retail <>", value, "p_retail");
            return (Criteria) this;
        }

        public Criteria andP_retailGreaterThan(Integer value) {
            addCriterion("p_retail >", value, "p_retail");
            return (Criteria) this;
        }

        public Criteria andP_retailGreaterThanOrEqualTo(Integer value) {
            addCriterion("p_retail >=", value, "p_retail");
            return (Criteria) this;
        }

        public Criteria andP_retailLessThan(Integer value) {
            addCriterion("p_retail <", value, "p_retail");
            return (Criteria) this;
        }

        public Criteria andP_retailLessThanOrEqualTo(Integer value) {
            addCriterion("p_retail <=", value, "p_retail");
            return (Criteria) this;
        }

        public Criteria andP_retailIn(List<Integer> values) {
            addCriterion("p_retail in", values, "p_retail");
            return (Criteria) this;
        }

        public Criteria andP_retailNotIn(List<Integer> values) {
            addCriterion("p_retail not in", values, "p_retail");
            return (Criteria) this;
        }

        public Criteria andP_retailBetween(Integer value1, Integer value2) {
            addCriterion("p_retail between", value1, value2, "p_retail");
            return (Criteria) this;
        }

        public Criteria andP_retailNotBetween(Integer value1, Integer value2) {
            addCriterion("p_retail not between", value1, value2, "p_retail");
            return (Criteria) this;
        }

        public Criteria andP_remarksIsNull() {
            addCriterion("p_remarks is null");
            return (Criteria) this;
        }

        public Criteria andP_remarksIsNotNull() {
            addCriterion("p_remarks is not null");
            return (Criteria) this;
        }

        public Criteria andP_remarksEqualTo(String value) {
            addCriterion("p_remarks =", value, "p_remarks");
            return (Criteria) this;
        }

        public Criteria andP_remarksNotEqualTo(String value) {
            addCriterion("p_remarks <>", value, "p_remarks");
            return (Criteria) this;
        }

        public Criteria andP_remarksGreaterThan(String value) {
            addCriterion("p_remarks >", value, "p_remarks");
            return (Criteria) this;
        }

        public Criteria andP_remarksGreaterThanOrEqualTo(String value) {
            addCriterion("p_remarks >=", value, "p_remarks");
            return (Criteria) this;
        }

        public Criteria andP_remarksLessThan(String value) {
            addCriterion("p_remarks <", value, "p_remarks");
            return (Criteria) this;
        }

        public Criteria andP_remarksLessThanOrEqualTo(String value) {
            addCriterion("p_remarks <=", value, "p_remarks");
            return (Criteria) this;
        }

        public Criteria andP_remarksLike(String value) {
            addCriterion("p_remarks like", value, "p_remarks");
            return (Criteria) this;
        }

        public Criteria andP_remarksNotLike(String value) {
            addCriterion("p_remarks not like", value, "p_remarks");
            return (Criteria) this;
        }

        public Criteria andP_remarksIn(List<String> values) {
            addCriterion("p_remarks in", values, "p_remarks");
            return (Criteria) this;
        }

        public Criteria andP_remarksNotIn(List<String> values) {
            addCriterion("p_remarks not in", values, "p_remarks");
            return (Criteria) this;
        }

        public Criteria andP_remarksBetween(String value1, String value2) {
            addCriterion("p_remarks between", value1, value2, "p_remarks");
            return (Criteria) this;
        }

        public Criteria andP_remarksNotBetween(String value1, String value2) {
            addCriterion("p_remarks not between", value1, value2, "p_remarks");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}